home *** CD-ROM | disk | FTP | other *** search
- June 6 1989 C.D. Havener
-
- This disk contains the C to C++ Migrator program ctocxx.exe
- and a pair of .bat files to run it. The ctocpp.bat file calls
- ctocpp1.bat. The MKS sed stream editor must be available or
- the final editing cannot be done. A small sampl.c program that
- does nothing but exhibits various function declaration styles
- is the sample input.
-
- Usage: ctocpp sampl.c
-
- This invokes the Microsoft C compiler with the /E option.
- The preprocessed source file will then be fed to ctocxx.exe.
- This version of ctocxx does not echo the input, if a syntax
- error occurs it reports the line number and column and quits.
- The output of ctocxx.exe is two files,
- proto.out and ed.out. The ed.out file is used by the sed
- stream editor to edit the original source file. The proto.out
- file is used in header files as required.
-
-
- The sampl.sed file is what the sampl.c becomes after editing.
-
- ------------------------------------------------------------
-
- This disk also contains the article and the source files to
- be listed with the article. The source files have been stripped
- tabs, all indenting is by spaces. EXAMPLE is a combined listing
- of the sampl.c input, the outputs and the result after sed edits
- the original source file. It is the first referenced listing
- in the article.
-
- The full grammar is gram.y ( over 400 lines ) which may be too
- much to use in the magazine. I have provided little.y which
- includes mainly just the productions that the migrator has
- code attached to. I left the tabs in the grammar.
-
- The other source files are ctocxx.l, subs.c, ctocxx.c and the
- header ctocxx.h. Yacc makes ytab.h when it runs but I have
- included it on the disk. The ctocxx file is a makefile for
- Microsoft C 5.1. The ctocpp.bat and ctocpp1.bat comprise a
- DOS batch file for running the migrator.
-
- I have copied the flex executables into the flex directory.
- You must have MKS yacc and sed to build and run the program.
- -------------------------------------------------------------
-
- Charlie Havener 508-369-4400 x3302 ( home 508-897-4499 )
-
-
- The article needs one figure which is not on the disk.
-